<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/echarts.js"></script>
</head>
<body>
    <!--容器-->
    <div id="main" style="width: 600px;height: 400px">

    </div>
<script type="text/javascript">

    let myecharts=echarts.init(document.getElementById("main"));

    let option={
        title:{
            text:"入门案例演示"
        },
        tooltip:{},
        legend:{
            data:['销量']
        },
        xAxis:{
            data:['衬衫','羊毛衫','工装裤','牛仔裤']
        },
        yAxis:{},
        series:[{
            name:'销量',
            type:'bar',
            data:[5,20,30,30]
        }]
    };
    myecharts.setOption(option)
</script>
</body>
</html>